package com.sunrise.xdoc.view.finance;

import java.util.Map;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.sunrise.xdoc.entity.finance.PhieuThanhToan;
import com.sunrise.xdoc.entity.finance.PhieuThanhToan.LoaiThanhToan;
import com.sunrise.xdoc.view.AbstractListDataModel;

@Repository
public class PhieuThuDataModel extends AbstractListDataModel<PhieuThanhToan> {
	private static final long serialVersionUID = -3859705484949253053L;

	@Override
	protected void filter(DetachedCriteria criteria, Map<String, Object> filters) {
		super.filter(criteria, filters);
		criteria.add(Restrictions.eq("loai", LoaiThanhToan.PHIEU_THU));
	}

}
